package com.iot.ammeter.network.services

import com.iot.ammeter.model.Response1
import com.iot.ammeter.model.Response2
import com.iot.ammeter.model.parcelable.UserInfo
import com.iot.ammeter.network.LOGIN_URL
import com.iot.ammeter.network.REGISTER_URL
import com.iot.ammeter.network.ResponseWrap
import retrofit2.Call
import retrofit2.http.Field
import retrofit2.http.POST

interface AuthService : RetrofitService {

    @POST(LOGIN_URL)
    fun login(
        @Field("email") email: String,
        @Field("password") password: String
    ): Call<ResponseWrap<Response1<String>>>

    @POST(REGISTER_URL)
    fun register(
        @Field("email") email: String,
        @Field("password") password: String,
        @Field("captcha") mailCode: String
    ): Call<ResponseWrap<Response1<String>>>
}